package com.example.springboot.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.List;

/**
 * 权限菜单表(MethodPermission)实体类
 *
 * @author makejava
 * @since 2024-05-01 23:30:18
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName("sys_permission")
public class Permission implements Serializable {
    private static final long serialVersionUID = -65772213986748935L;

    //权限id
    @TableId(type = IdType.AUTO)
    private Integer pid;
    //权限串值
    private String permissionval;
    //权限的描述(菜单名)
    private String permissiondes;
    //父权限|菜单ID
    private Integer parentid;
    //显示顺序
    private Integer ordernum;
    //路由地址
    private String path;
    //组件路径
    private String component;
    //菜单图标
    private String icon;
    //权限对应的类型(目录:M|菜单:C|按钮:B)
    private String type;

    // 下级列表
    @TableField(exist = false)
    private List<Permission> children;
    //是否选中
    @TableField(exist = false)
    private boolean isSelect;
}

